
#ifndef _MAINWINDOW_H_
#define _MAINWINDOW_H_

#include <BTextEdit>
#include <BComboBox>
#include <BLineEdit>
#include <BMainWindow>
#include <BFileDialog>

using namespace BWE;

class MainWindow : public BMainWindow
{
	BOBJECT(MainWindow)
public:
	MainWindow();
	~MainWindow();

	bool loadFontFiles(const BString& path = BString());

private:
	const char* encodingToText(Encoding encoding);
	Encoding textToEncoding(const BString& text);

protected:
	virtual void procTextChanged(int signal, const BValue& value);
	void procChooseFontPath();
	void procFontChanged(BObject* object, const BValue& value);
	void procEncodingChanged(BObject* object, const BValue& value);

private:
	BButton*			_pathButton;
	BTextEdit*			_textEdit;
	BComboBox*			_fontComboBox;
	BComboBox*			_encodeComboBox;

	BFileDialog*		_fileDialog;
};

#endif